<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>mongoose模块</title>
</head>
<body>
<p>**********************注册**********************</p>
<form action="/users/register" id="reqister" method="post">
    <label for="username">用 &nbsp;户&nbsp; 名：</label>
    <input type="text" name="username" id="username" required="required"/>
    <input type="number" name="phoneNum" id="phoneNum">
    <br />
    <!-- 密码和确认密码一致自己判断 -->
    <label for="psw">密 &nbsp;&#x3000;&nbsp; 码：</label>
    <input type="password" name="psw" id="psw" required="required"/>
    <br />
    <label for="repsd">确认密码：</label>
    <input type="password" id="repsd" required="required"/>
    <br />
    <input type="submit" value="注册"/>
</form>



<!--<p>**********************删除账号**********************</p>-->
<!--<form action="/users/remove" id="remove" method="post">-->
    <!--<label for="username">删除人：</label>-->
    <!--<input type="text" name="username" id="username" required="required"/>-->
    <!--<br />-->
    <!--<label for="psw">密&#3000;码：</label>-->
    <!--<input type="password" name="psw" id="psw" required="required"/>-->
    <!--<br />-->
    <!--<input type="submit" value="确认删除"/>-->
<!--</form>-->
</body>
</html>
<script src="/js/jquery.min.js"></script>
<script>
    $('form').submit(function (event) {
        event.preventDefault();
        var data = $(this).serialize();
        $.post('/users/register',data,function (resData) {
            console.log('注册成功');
        })
    })
</script>
